<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<%@ taglib tagdir="/WEB-INF/tags" prefix="p" %>

<script type="text/javascript" src="<%=request.getContextPath()%>/js/validators/position.js"></script>

 <div class="f_l margin1" style="width:100%">
    <h1 style="height:24px;color:red" align="center" id="errorInfo">${failInfo }</h1>
    <div style="height:24px;color:red;font-weight:bold" align="left">修改职位</div>
    <s:form id="submitForm" action="position!update" method="post" theme="simple">
    <table>
    	<tbody>
    		<tr>
    			<td><s:text name="名称"/>：</td>
    			<td><input type="text" name="position.name" value="${position.name}"></td>
    			<td><s:text name="编号"/>：</td>
    			<td><input type="text" name="position.positionNo" value="${position.positionNo}">  </td>
    		</tr>
    		<tr>
    			<td><s:text name="上级"/>：</td>
    			<td>
    			  <select name="position.superiorId" >
	                <option value="">无</option>
	                <s:iterator value="allPositions" status="status">
	                    <option value="${id}" <s:if test="%{position.superiorId == id}">selected="selected"</s:if>>${name}</option>
	                </s:iterator>
            	  </select>
    			</td>
    			<td><s:text name="类型"/>：</td>
    			<td><input type="text" name="position.type" value="${position.type}"></td>
    		</tr>
    		<tr>
    		<td colspan="4" align="center">
	    		 <input type="submit" value="确认" onclick="return doValidate(event);" />
	            &nbsp;&nbsp;
	            <input type="button" value="取消" onclick="javascript:history.back(-1);"/>
    		</td>
    		</tr>
    	</tbody>
    </table>
        <input type="hidden" id="position.id" name="position.id" value="${position.id}">
        <input type="hidden" id="position.companyId" name="companyId" value="${position.companyId}">
        <input type="hidden" id="position.companyName" name="position.companyName" value="${position.companyName}">
    </s:form>
</div>    